arithmetic types (1) | basic_ostream& operator<< (bool val);basic_ostream& operator<< (short val);basic_ostream& operator<< (unsigned short val);basic_ostream& operator<< (int val);basic_ostream& operator<< (unsigned int val);basic_ostream& operator<< (long val);basic_ostream& operator<< (unsigned long val);basic_ostream& operator<< (float val);basic_ostream& operator<< (double val);basic_ostream& operator<< (long double val);basic_ostream& operator<< (void* val); |
---|---|
stream buffers (2) | basic_ostream& operator<< (basic_streambuf<char_type,traits_type>* sb ); |
manipulators (3) | basic_ostream& operator<< (basic_ostream& (*pf)(basic_ostream&));basic_ostream& operator<< ( basic_ios<char_type,traits_type>& (*pf)(basic_ios<char_type,traits_type>&));basic_ostream& operator<< (ios_base& (*pf)(ios_base&)); |
arithmetic types (1) | basic_ostream& operator<< (bool val);basic_ostream& operator<< (short val);basic_ostream& operator<< (unsigned short val);basic_ostream& operator<< (int val);basic_ostream& operator<< (unsigned int val);basic_ostream& operator<< (long val);basic_ostream& operator<< (unsigned long val);basic_ostream& operator<< (long long val);basic_ostream& operator<< (unsigned long long val);basic_ostream& operator<< (float val);basic_ostream& operator<< (double val);basic_ostream& operator<< (long double val);basic_ostream& operator<< (void* val); |
---|---|
stream buffers (2) | basic_ostream& operator<< (basic_streambuf<char_type,traits_type>* sb ); |
manipulators (3) | basic_ostream& operator<< (basic_ostream& (*pf)(basic_ostream&));basic_ostream& operator<< ( basic_ios<char_type,traits_type>& (*pf)(basic_ios<char_type,traits_type>&));basic_ostream& operator<< (ios_base& (*pf)(ios_base&)); |
<<
) applied to an output stream is known as insertion operator:pf(*this)
, where pf may be a manipulator.manipulator | Effect |
---|---|
endl | Inserts a new-line character and flushes the stream. |
ends | Inserts a null character. |
flush | Flushes the stream. |
boolalpha / noboolalpha | Activates/deactivates the insertion of bool values as their alphanumerical representations. |
showbase / noshowbase | Activates/deactivates the insertion of base prefixes in the representations of integer values. |
showpoint / noshowpoint | Activates/deactivates the requirement that the decimal point is always written on the representations of floating-point values. |
showpos / noshowpos | Activates/deactivates the requirement that positive values are preceded with a plus sign (+ ). |
unitbuf / nounitbuf | Activates/deactivates automatic flushing after each insertion operation. |
uppercase / nouppercase | Activates/deactivates the use of uppercase letters for characters used in the representations of arithmetic types. |
dec / hex / oct | basefield setting: Sets that base used to represent integral numerical values. |
fixed / scientific / hexfloat / defaultfloat | floatfield setting: Format used to represent floating-point values. |
internal / left / right | adjustfield setting: Position where fill characters are inserted to adjust the field to the field width. |
manipulator | Effect |
---|---|
setbase | Sets the numerical base used to represent integral numerical values . |
setfill | Sets the fill character used to adjust fields to the field width. |
setprecision | Sets the decimal precision used to represent floating-point values. |
setw | Sets the field width used by the next formatted insertion. |
setiosflags/resetiosflags | Set/reset format flags. |
*this
).flag | error |
---|---|
eofbit | - |
failbit | The function failed to format val (it may also be set if the construction of sentry failed). For (2), it is set if no characters could be extracted from the object pointed by sb. |
badbit | Either the insertion on the stream failed, or some other error happened (such as when this function catches an exception thrown by an internal operation). When set, the integrity of the stream may have been affected. For (2), it is also set if sb is a null pointer. |
|
|
65 |